package org.jeecg.modules.demo.yxtraderdata.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.yxtraderdata.entity.YxTraderData;
import org.jeecg.modules.demo.yxtraderdata.mapper.YxTraderDataMapper;
import org.jeecg.modules.demo.yxtraderdata.service.IYxTraderDataService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: yx_trader_data
 * @Author: jeecg-boot
 * @Date:   2022-11-10
 * @Version: V1.0
 */
@Service
public class YxTraderDataServiceImpl extends ServiceImpl<YxTraderDataMapper, YxTraderData> implements IYxTraderDataService {

    @Resource
    private YxTraderDataMapper yxTraderDataMapper;

    @Override
    public List<String> getList(){
        return yxTraderDataMapper.getList();
    }

    @Override
    public List<String> getTeantId(){
        return yxTraderDataMapper.getTeantId();
    }

    @Override
    public Integer getByTeantId(YxTraderData yxTraderData){
        return yxTraderDataMapper.getByTeantId(yxTraderData);
    }
    @Override
    public List<YxTraderData> getTraderData(){
        return yxTraderDataMapper.getTraderData();
    }

    @Override
    public boolean revertLogicDeletedTraderData(List<String> tradeDataIds) {
        String ids = String.format("'%s'", String.join("','", tradeDataIds));
        return yxTraderDataMapper.revertLogicDeletedTraderData(ids) > 0;
    }

}
